import moment, { Moment } from "moment";

/**
 * 时间差
 * @param time1
 * @param time2
 */
export function timeDifference(time1: Moment, time2: Moment) {
  const duration = moment.duration(time2.diff(time1));
  // @ts-ignore
  return duration.format("HH:mm:ss");
}
